<?

class Debug {

    public $tm1;
    public $tm2;
    public $etime;

    public function DTime_start($bool) {
        if ($bool == true) {
            $this->tm1 = array_sum(explode(' ', microtime()));
        }
    }

    public function DTime_end($bool) {
        if ($bool == true) {
            $this->tm2 = array_sum(explode(' ', microtime()));
            $this->etime = sprintf("%3.5f(ms)", ($this->tm2 - $this->tm1));
            $RESULT["etime"] = $this->etime;
            echo"<div style=\"position:absolute; width:100px; height:20px; vertical-align:top; text-align:right;color:red;\">$this->etime</div>";
            //print_r($RESULT);
        }
    }

}
